package com.drinkdelivery.common.domain;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.drinkdelivery.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 用户对象 users
 *
 * @author lzh
 * @date 2024-07-22
 */
public class Users implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 用户ID，主键，自增
     */
    private Integer id;

    /**
     * 用户名
     */
    @ApiModelProperty(value = "用户名")
    @Excel(name = "用户名")
    private String username;

    /**
     * 电话
     */
    @ApiModelProperty(value = "电话")
    @Excel(name = "电话")
    private String phone;

    /**
     * 用户OpenID
     */
    @ApiModelProperty(value = "用户OpenID")
    @Excel(name = "用户OpenID")
    private String openid;

    /**
     * VIP状态
     */
    @ApiModelProperty(value = "VIP状态")
    @Excel(name = "VIP状态")
    private String vipStatus;

    /**
     * 用户头像URL
     */
    @ApiModelProperty(value = "用户头像URL")
    @Excel(name = "用户头像URL")
    private String avatarUrl;

    /**
     * 逻辑删除标记，0-未删除，1-已删除
     */
    @ApiModelProperty(value = "逻辑删除标记，0-未删除，1-已删除")
    @Excel(name = "逻辑删除标记，0-未删除，1-已删除")
    private Integer isDeleted;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    @Excel(name = "创建时间" , width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    @Excel(name = "更新时间" , width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    @ApiModelProperty(value = "登录状态令牌")
    private String token;

    public void setToken(String token) {
        this.token = token;
    }

    public String getToken() {
        return token;
    }


    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUsername() {
        return username;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getOpenid() {
        return openid;
    }

    public void setVipStatus(String vipStatus) {
        this.vipStatus = vipStatus;
    }

    public String getVipStatus() {
        return vipStatus;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id" , getId())
                .append("username" , getUsername())
                .append("phone" , getPhone())
                .append("openid" , getOpenid())
                .append("vipStatus" , getVipStatus())
                .append("avatarUrl" , getAvatarUrl())
                .append("isDeleted" , getIsDeleted())
                .append("createdAt" , getCreatedAt())
                .append("updatedAt" , getUpdatedAt())
                .append("token" , getToken())

                .toString();
    }
}
